﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Component;

public partial class BackEnd__CategoryList : System.Web.UI.UserControl
{
    public string matHang = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        
        DataBind(ContentManagementDB.GetAll(true));
        grid.RowCancelingEdit += delegate {  Response.Redirect(Request.Url.ToString()); };
        Session["1"] = "<a href=\"" + Request.RawUrl + "\"  style =\"text-decoration:none\">Trang chủ </a>";
        Session["2"] = "";
    }
    #region ----------------------------- Ham viet tay -------------------------------------
    void DataBind(object al)
    {
        if (al != null)
        {
            grid.DataKeyNames = new string[] { ColumContentManagement._Id};
            grid.DataSource = al;
            grid.DataBind();
        }
    }
    #endregion
}
